<?php
require_once $_SESSION["app_root"]."config/app.config.php";


class EntityRecordDAO
{
	public static function PushValue($record, $dbField, $value){
		//$record = EntityRecordDVO::cast($record);
		$record->Fields[$dbField] = $value;
		return $record;
	}
	
	public static function InsertRecord($entityRecords, $TableName){
		$db = GetDatabase();
		//$db->BeginTrans();
		$result = $db->AutoExecute($TableName, $entityRecords->Fields, 'INSERT');
		$status = array();
		if($result){
			$status['success'] = true;
			$status['message'] = "Success in inserting record";
			return $status;
		}else{
			$status['success'] = false;
			$status['message'] = "Failure in inserting record";
			return $status;
		}
	}
}

?>